home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / XmToggleButton.z / XmToggleButton
Text File  |  1998-10-30  |  70KB  |  925 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn - The ToggleButton widget class
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           #include <Xm/ToggleB.h>
  13.  
  14.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  15.           This page documents Motif 2.1.
  16.  
  17.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.           ToggleButton sets nontransitory state data within an
  19.           application. Usually this widget consists of an indicator
  20.           (square, diamond, or round) with either text or a pixmap on
  21.           one side of it.  However, it can also consist of just text
  22.           or a pixmap without the indicator.
  23.  
  24.           The toggle graphics display a 1111----ooooffff----mmmmaaaannnnyyyy, NNNN----ooooffff----mmmmaaaannnnyyyy, or 1111----
  25.           ooooffff----mmmmaaaannnnyyyy----rrrroooouuuunnnndddd selection state.  When a toggle indicator is
  26.           displayed, a square indicator shows an NNNN----ooooffff----mmmmaaaannnnyyyyselection
  27.           state, a diamond-shaped indicator shows a 1111----ooooffff----mmmmaaaannnnyyyy
  28.           selection state, and a circle-shaped indicator shows a 1111----
  29.           ooooffff----mmmmaaaannnnyyyy----rrrroooouuuunnnndddd selection state.
  30.  
  31.           ToggleButton implies a set or unset state.  In the case of a
  32.           label and an indicator, an empty indicator (square, diamond,
  33.           or round) indicates that ToggleButton is unset, and a filled
  34.           indicator shows that it is set. The indicator may be filled
  35.           with a check mark, a cross, or the select color. In the case
  36.           of a pixmap toggle, different pixmaps are used to display
  37.           the set/unset states.  ToggleButton can also indicate an
  38.           indeterminate state. In the case of a label and an
  39.           indicator, an indeterminate state is indicated by a stippled
  40.           flat box.  In the case of a pixmap toggle, a different
  41.           pixmap is used to display the indeterminate state.
  42.  
  43.           The default behavior associated with a ToggleButton in a
  44.           menu depends on the type of menu system in which it resides.
  45.           By default, <<<<BBBBttttnnnn1111>>>> controls the behavior of the
  46.           ToggleButton.  In addition, <<<<BBBBttttnnnn3333>>>> controls the behavior of
  47.           the ToggleButton if it resides in a PopupMenu system.  The
  48.           actual mouse button used is determined by its RowColumn
  49.           parent.
  50.  
  51.           Label's resource XXXXmmmmNNNNmmmmaaaarrrrggggiiiinnnnLLLLeeeefffftttt may be increased to
  52.           accommodate the toggle indicator when it is created.
  53.  
  54.           ToggleButton uses the _X_m_Q_T_m_e_n_u_S_y_s_t_e_m and
  55.           _X_m_Q_T_s_p_e_c_i_f_y_R_e_n_d_e_r_T_a_b_l_e traits.
  56.  
  57.         CCCCllllaaaasssssssseeeessss
  58.           ToggleButton inherits behavior, resources, and traits from
  59.           CCCCoooorrrreeee, XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee, and XXXXmmmmLLLLaaaabbbbeeeellll.
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  71.  
  72.  
  73.  
  74.           The class pointer is _x_m_T_o_g_g_l_e_B_u_t_t_o_n_W_i_d_g_e_t_C_l_a_s_s.
  75.  
  76.           The class name is XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn.
  77.  
  78.         NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss
  79.           The following table defines a set of widget resources used
  80.           by the programmer to specify data. The programmer can also
  81.           set the resource values for the inherited classes to set
  82.           attributes for this widget. To reference a resource by name
  83.           or by class in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove the XXXXmmmmNNNN or XXXXmmmmCCCC
  84.           prefix and use the remaining letters. To specify one of the
  85.           defined values for a resource in a ....XXXXddddeeeeffffaaaauuuullllttttssss file, remove
  86.           the XXXXmmmm prefix and use the remaining letters (in either
  87.           lowercase or uppercase, but include any underscores between
  88.           words).  The codes in the access column indicate if the
  89.           given resource can be set at creation time (C), set by using
  90.           XXXXttttSSSSeeeettttVVVVaaaalllluuuueeeessss (S), retrieved by using XXXXttttGGGGeeeettttVVVVaaaalllluuuueeeessss (G), or is
  91.           not applicable (N/A).
  92.  
  93.                                                 XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  94.           NNNNaaaammmmeeee                         CCCCllllaaaassssssss                        TTTTyyyyppppeeee             DDDDeeeeffffaaaauuuulllltttt                AAAAcccccccceeeessssssss
  95.           XmNarmCallback               XmCArmCallback               XtCallbackList   NULL                   C
  96.           XmNdetailShadowThickness     XmCDetailShadowThickness     Dimension        2                      CSG
  97.           XmNdisarmCallback            XmCDisarmCallback            XtCallbackList   NULL                   C
  98.           XmNfillOnSelect              XmCFillOnSelect              Boolean          dynamic                CSG
  99.           XmNindeterminatePixmap       XmCIndeterminatePixmap       Pixmap           XmUNSPECIFIED_PIXMAP   CSG
  100.           XmNindicatorOn               XmCIndicatorOn               unsigned char    XmINDICATOR_FILL       CSG
  101.           XmNindicatorSize             XmCIndicatorSize             Dimension        dynamic                CSG
  102.           XmNindicatorType             XmCIndicatorType             unsigned char    dynamic                CSG
  103.           XmNselectColor               XmCSelectColor               Pixel            dynamic                CSG
  104.           XmNselectInsensitivePixmap   XmCSelectInsensitivePixmap   Pixmap           XmUNSPECIFIED_PIXMAP   CSG
  105.           XmNselectPixmap              XmCSelectPixmap              Pixmap           XmUNSPECIFIED_PIXMAP   CSG
  106.           XmNset                       XmCSet                       unsigned char    XmUNSET                CSG
  107.           XmNspacing                   XmCSpacing                   Dimension        4                      CSG
  108.           XmNtoggleMode                XmCToggleMode                unsigned char    XmTOGGLE_BOOLEAN       CSG
  109.           XmNunselectColor             XmCUnselectColor             Pixel            dynamic                CSG
  110.           XmNvalueChangedCallback      XmCValueChangedCallback      XtCallbackList   NULL                   C
  111.           XmNvisibleWhenOff            XmCVisibleWhenOff            Boolean          dynamic                CSG
  112.  
  113.           XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk
  114.                     Specifies the list of callbacks called when the
  115.                     ToggleButton is armed.  To arm this widget, press
  116.                     the active mouse button while the pointer is
  117.                     inside the ToggleButton.  For this callback, the
  118.                     reason is XXXXmmmmCCCCRRRR____AAAARRRRMMMM.
  119.  
  120.           XXXXmmmmNNNNddddeeeettttaaaaiiiillllSSSShhhhaaaaddddoooowwwwTTTThhhhiiiicccckkkknnnneeeessssssss
  121.                     Specifies the thickness of the indicator shadow.
  122.                     The default thickness is 2 pixels.
  123.  
  124.           XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk
  125.                     Specifies the list of callbacks called when
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  137.  
  138.  
  139.  
  140.                     ToggleButton is disarmed.  To disarm this widget,
  141.                     press and release the active mouse button while
  142.                     the pointer is inside the ToggleButton.  This
  143.                     widget is also disarmed when the user moves out of
  144.                     the widget and releases the mouse button when the
  145.                     pointer is outside the widget.  For this callback,
  146.                     the reason is XXXXmmmmCCCCRRRR____DDDDIIIISSSSAAAARRRRMMMM.
  147.  
  148.           XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt
  149.                     Fills the indicator with the color specified in
  150.                     XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr and switches the top and bottom
  151.                     shadow colors when set to True. If unset, fills
  152.                     the indicator with the unselect color. If
  153.                     indeterminate, fills the indicator with half
  154.                     select color and half unselect color. Otherwise,
  155.                     it switches only the top and bottom shadow colors.
  156.                     The default is True only if a box type of
  157.                     indicator (such as a check box) is specified, or
  158.                     if the XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrTTTTyyyyppppeeee is a 1111----ooooffff type and a
  159.                     toggle indicator is drawn.
  160.  
  161.                     If XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt is True, XXXXmmmmNNNNsssseeeetttt is XXXXmmmmSSSSEEEETTTT, and
  162.                     XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____NNNNOOOONNNNEEEE the
  163.                     ToggleButton's background is set to
  164.                     XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr. For the other XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn
  165.                     values, only the indicator is filled with
  166.                     XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr.
  167.  
  168.           XXXXmmmmNNNNiiiinnnnddddeeeetttteeeerrrrmmmmiiiinnnnaaaatttteeeeIIIInnnnsssseeeennnnssssiiiittttiiiivvvveeeePPPPiiiixxxxmmmmaaaapppp
  169.                     Specifies the pixmap to be displayed as the button
  170.                     face when the Label _X_m_N_l_a_b_l_e_T_y_p_e resource is
  171.                     XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP, the ToggleButton XXXXmmmmNNNNsssseeeetttt resource is
  172.                     XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE, and the CCCCoooorrrreeee XXXXmmmmNNNNsssseeeennnnssssiiiittttiiiivvvveeee
  173.                     resource is False.
  174.  
  175.           XXXXmmmmNNNNiiiinnnnddddeeeetttteeeerrrrmmmmiiiinnnnaaaatttteeeePPPPiiiixxxxmmmmaaaapppp
  176.                     Specifies the pixmap to be displayed as the button
  177.                     face when the Label _X_m_N_l_a_b_l_e_T_y_p_e resource is
  178.                     XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP, the ToggleButton XXXXmmmmNNNNsssseeeetttt resource is
  179.                     XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE, and the CCCCoooorrrreeee XXXXmmmmNNNNsssseeeennnnssssiiiittttiiiivvvveeee
  180.                     resource is True.
  181.  
  182.           XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn
  183.                     Specifies that if a toggle indicator is to be
  184.                     drawn, it will be drawn to one side of the toggle
  185.                     text or pixmap, depending on the
  186.                     XXXXmmmmNNNNllllaaaayyyyoooouuuuttttDDDDiiiirrrreeeeccccttttiiiioooonnnn resource of the widget. The
  187.                     default value is XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____FFFFIIIILLLLLLLL.  Toggles accept
  188.                     the following values:
  189.  
  190.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____NNNNOOOONNNNEEEE
  191.                               No space is allocated for the indicator,
  192.  
  193.  
  194.  
  195.      Page 3                                         (printed 10/24/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  203.  
  204.  
  205.  
  206.                               and it is not displayed. Any shadows
  207.                               around the entire widget are switched
  208.                               when the toggle is selected or
  209.                               unselected.
  210.  
  211.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____BBBBOOOOXXXX
  212.                               The toggle indicator is in the shape of
  213.                               a shadowed box.
  214.  
  215.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____FFFFIIIILLLLLLLL
  216.                               If the value of the XXXXmmmmDDDDiiiissssppppllllaaaayyyy
  217.                               XXXXmmmmNNNNeeeennnnaaaabbbblllleeeeTTTToooogggggggglllleeeeVVVViiiissssuuuuaaaallllresource is TTTTrrrruuuueeee,
  218.                               the visuals are those of
  219.                               _X_m_I_N_D_I_C_A_T_O_R__C_H_E_C_K__B_O_X; if FFFFaaaallllsssseeee, the
  220.                               indicator visuals are those of
  221.                               _X_m_I_N_D_I_C_A_T_O_R__B_O_X.
  222.  
  223.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____CCCCHHHHEEEECCCCKKKK
  224.                               The toggle indicator is in the shape of
  225.                               a checkmark in the foreground color.
  226.  
  227.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____CCCCHHHHEEEECCCCKKKK____BBBBOOOOXXXX
  228.                               The toggle indicator is in the shape of
  229.                               a checkmark enclosed in a box.  This is
  230.                               the default if the XXXXmmmmDDDDiiiissssppppllllaaaayyyy
  231.                               XXXXmmmmNNNNeeeennnnaaaabbbblllleeeeTTTToooogggggggglllleeeeVVVViiiissssuuuuaaaallllresource is set.
  232.  
  233.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____CCCCRRRROOOOSSSSSSSS____BBBBOOOOXXXX
  234.                               The toggle indicator is in the shape of
  235.                               a cross enclosed in a box.
  236.  
  237.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____CCCCRRRROOOOSSSSSSSS
  238.                               The toggle indicator is in the shape of
  239.                               a cross.
  240.  
  241.                     All ToggleButton checks and crosses should be
  242.                     drawn in the foreground color.
  243.  
  244.                     If this resource is not XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____NNNNOOOONNNNEEEE, it will
  245.                     control the appearance of the toggle visual. If
  246.                     XXXXmmmmNNNNsssseeeetttt is XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE and XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is
  247.                     not XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____NNNNOOOONNNNEEEE, this resource shows a
  248.                     stippled flat box.  If XXXXmmmmNNNNsssseeeetttt is XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE,
  249.                     XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____NNNNOOOONNNNEEEE, and
  250.                     XXXXmmmmNNNNttttoooogggggggglllleeeeMMMMooooddddeeee is XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____IIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE, the label
  251.                     and the ToggleButton are stippled with a
  252.                     combination of the XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr and the
  253.                     XXXXmmmmNNNNuuuunnnnsssseeeelllleeeeccccttttCCCCoooolllloooorrrr color, and the border is flat.
  254.  
  255.           XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrSSSSiiiizzzzeeee
  256.                     Sets the size of the indicator.  If no value is
  257.                     specified, the size of the indicator is based on
  258.  
  259.  
  260.  
  261.      Page 4                                         (printed 10/24/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  269.  
  270.  
  271.  
  272.                     the size of the label string or pixmap.  If the
  273.                     label string or pixmap changes, the size of the
  274.                     indicator is recomputed based on the size of the
  275.                     label string or pixmap.  Once a value has been
  276.                     specified for XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrSSSSiiiizzzzeeee, the indicator has
  277.                     that size, regardless of the size of the label
  278.                     string or pixmap, until a new value is specified.
  279.                     The size of indicators inside menus may differ
  280.                     from those outside of menus.  Note that a change
  281.                     in this resource may also cause a change in the
  282.                     values of the inherited resources XXXXmmmmNNNNmmmmaaaarrrrggggiiiinnnnTTTToooopppp,
  283.                     XXXXmmmmNNNNmmmmaaaarrrrggggiiiinnnnBBBBoooottttttttoooommmm, and XXXXmmmmNNNNmmmmaaaarrrrggggiiiinnnnLLLLeeeefffftttt.
  284.  
  285.           XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrTTTTyyyyppppeeee
  286.                     Specifies if the indicator is a 1111----ooooffff or NNNN----ooooffff
  287.                     indicator. For the 1111----ooooffff indicator, the value can
  288.                     be XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY, XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY____RRRROOOOUUUUNNNNDDDD, or
  289.                     XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY____DDDDIIIIAAAAMMMMOOOONNNNDDDD.  For the NNNN----ooooffff indicator,
  290.                     the value is XXXXmmmmNNNN____OOOOFFFF____MMMMAAAANNNNYYYY.  This value specifies
  291.                     only the visuals and does not enforce the
  292.                     behavior. When the ToggleButton is in a radio box,
  293.                     the default is XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY; otherwise, the
  294.                     default is XXXXmmmmNNNN____OOOOFFFF____MMMMAAAANNNNYYYY. Legal values are:
  295.  
  296.                     XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY
  297.                               When the Display
  298.                               XXXXmmmmNNNNeeeennnnaaaabbbblllleeeeTTTToooogggggggglllleeeeVVVViiiissssuuuuaaaallllresource is set,
  299.                               indicators are drawn with the same
  300.                               appearance as XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY____RRRROOOOUUUUNNNNDDDD;
  301.                               otherwise, they appear the same as
  302.                               XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY____DDDDIIIIAAAAMMMMOOOONNNNDDDD.
  303.  
  304.                     XXXXmmmmNNNN____OOOOFFFF____MMMMAAAANNNNYYYY
  305.                               The indicators are drawn as specified by
  306.                               the XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnnresource.
  307.  
  308.                     XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY____RRRROOOOUUUUNNNNDDDD
  309.                               A shadowed circle.
  310.  
  311.                     XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY____DDDDIIIIAAAAMMMMOOOONNNNDDDD
  312.                               A shadowed diamond.
  313.  
  314.           XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr
  315.                     Allows the application to specify what color fills
  316.                     the center of the square, diamond-shaped, or round
  317.                     indicator when it is set.  If this color is the
  318.                     same as either the top or the bottom shadow color
  319.                     of the indicator, a one-pixel-wide margin is left
  320.                     between the shadows and the fill; otherwise, it is
  321.                     filled completely.  The results of this resource
  322.                     depend on the value of the Display resource
  323.                     XXXXmmmmNNNNeeeennnnaaaabbbblllleeeeTTTToooogggggggglllleeeeCCCCoooolllloooorrrr. A value of True causes the
  324.  
  325.  
  326.  
  327.      Page 5                                         (printed 10/24/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  335.  
  336.  
  337.  
  338.                     fill color to use the XXXXmmmmHHHHIIIIGGGGHHHHLLLLIIIIGGGGHHHHTTTT____CCCCOOOOLLLLOOOORRRR color by
  339.                     default. A value of False causes the fill color to
  340.                     use the background color.  This resource's default
  341.                     for a color display is a color between the
  342.                     background and the bottom shadow color. For a
  343.                     monochrome display, the default is set to the
  344.                     foreground color. To set the background of the
  345.                     button to XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr when XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is
  346.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____NNNNOOOONNNNEEEE, the value of XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt
  347.                     must be explicitly set to True.
  348.  
  349.                     This resource is also used as the background color
  350.                     when all of the following conditions are met: the
  351.                     button is armed in a menu, the
  352.                     XXXXmmmmNNNNeeeennnnaaaabbbblllleeeeEEEEttttcccchhhheeeeddddIIIInnnnMMMMeeeennnnuuuu resource is TTTTrrrruuuueeee, the
  353.                     XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn resource is FFFFaaaallllsssseeee, and the
  354.                     XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt resource is TTTTrrrruuuueeee.
  355.  
  356.                     This resource can take the following values:
  357.  
  358.                     XXXXmmmmDDDDEEEEFFFFAAAAUUUULLLLTTTT____SSSSEEEELLLLEEEECCCCTTTT____CCCCOOOOLLLLOOOORRRR
  359.                               Is the same as the current dynamic
  360.                               default, which is a color between the
  361.                               background and the bottom shadow color.
  362.  
  363.                     XXXXmmmmRRRREEEEVVVVEEEERRRRSSSSEEEEDDDD____GGGGRRRROOOOUUUUNNNNDDDD____CCCCOOOOLLLLOOOORRRRSSSS
  364.                               Forces the select color to the
  365.                               foreground color and causes the default
  366.                               color of any text rendered over the
  367.                               select color to be in the background
  368.                               color.
  369.  
  370.                     XXXXmmmmHHHHIIIIGGGGHHHHLLLLIIIIGGGGHHHHTTTT____CCCCOOOOLLLLOOOORRRR
  371.                               Forces the fill color to use the
  372.                               highlight color.
  373.  
  374.           XXXXmmmmNNNNsssseeeelllleeeeccccttttIIIInnnnsssseeeennnnssssiiiittttiiiivvvveeeePPPPiiiixxxxmmmmaaaapppp
  375.                     Specifies a pixmap used as the button face when
  376.                     the ToggleButton is selected, the button is
  377.                     insensitive, and the Label resource XXXXmmmmNNNNllllaaaabbbbeeeellllTTTTyyyyppppeeee
  378.                     is set to XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP.  If the ToggleButton is
  379.                     unselected and the button is insensitive, the
  380.                     pixmap in XXXXmmmmNNNNllllaaaabbbbeeeellllIIIInnnnsssseeeennnnssssiiiittttiiiivvvveeeePPPPiiiixxxxmmmmaaaapppp is used as the
  381.                     button face.  If no value is specified for
  382.                     XXXXmmmmNNNNllllaaaabbbbeeeellllIIIInnnnsssseeeennnnssssiiiittttiiiivvvveeeePPPPiiiixxxxmmmmaaaapppp, that resource is set to
  383.                     the value specified for
  384.                     XXXXmmmmNNNNsssseeeelllleeeeccccttttIIIInnnnsssseeeennnnssssiiiittttiiiivvvveeeePPPPiiiixxxxmmmmaaaapppp.
  385.  
  386.           XXXXmmmmNNNNsssseeeelllleeeeccccttttPPPPiiiixxxxmmmmaaaapppp
  387.                     Specifies the pixmap to be used as the button face
  388.                     when XXXXmmmmNNNNllllaaaabbbbeeeellllTTTTyyyyppppeeee is XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP and the ToggleButton
  389.                     is selected.  When the ToggleButton is unselected,
  390.  
  391.  
  392.  
  393.      Page 6                                         (printed 10/24/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  401.  
  402.  
  403.  
  404.                     the pixmap specified in the Label's XXXXmmmmNNNNllllaaaabbbbeeeellllPPPPiiiixxxxmmmmaaaapppp
  405.                     is used.  If no value is specified for
  406.                     XXXXmmmmNNNNllllaaaabbbbeeeellllPPPPiiiixxxxmmmmaaaapppp, that resource is set to the value
  407.                     specified for XXXXmmmmNNNNsssseeeelllleeeeccccttttPPPPiiiixxxxmmmmaaaapppp.
  408.  
  409.           XXXXmmmmNNNNsssseeeetttt    Represents the state of the ToggleButton.  A value
  410.                     of XXXXmmmmUUUUNNNNSSSSEEEETTTT indicates that the ToggleButton is not
  411.                     set.  A value of XXXXmmmmSSSSEEEETTTT indicates that the
  412.                     ToggleButton is set.  A value of XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE
  413.                     indicates that the ToggleButton is in an
  414.                     indeterminate state (neither set nor unset).  The
  415.                     ToggleButton states cycle through in the order of
  416.                     XXXXmmmmSSSSEEEETTTT, XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE (if XXXXmmmmNNNNttttoooogggggggglllleeeeMMMMooooddddeeee is set to
  417.                     XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____IIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE), and XXXXmmmmUUUUNNNNSSSSEEEETTTT, and then
  418.                     back around to XXXXmmmmSSSSEEEETTTT. If XXXXmmmmNNNNttttoooogggggggglllleeeeMMMMooooddddeeee is set to
  419.                     XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____BBBBOOOOOOOOLLLLEEEEAAAANNNN, then the ToggleButton states
  420.                     cycle through in the order of XXXXmmmmSSSSEEEETTTT, then XXXXmmmmUUUUNNNNSSSSEEEETTTT,
  421.                     and then back around to XXXXmmmmSSSSEEEETTTT.  Setting this
  422.                     resource sets the state of the ToggleButton.
  423.  
  424.           XXXXmmmmNNNNssssppppaaaacccciiiinnnngggg
  425.                     Specifies the amount of spacing between the toggle
  426.                     indicator and the toggle label (text or pixmap).
  427.  
  428.           XXXXmmmmNNNNttttoooogggggggglllleeeeMMMMooooddddeeee
  429.                     Specifies the mode of the ToggleButton as either
  430.                     XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____BBBBOOOOOOOOLLLLEEEEAAAANNNN or XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____IIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE. The
  431.                     XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____IIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE value allows the XXXXmmmmNNNNsssseeeetttt
  432.                     resource to be able to accept the values
  433.                     XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE, XXXXmmmmSSSSEEEETTTT, and XXXXmmmmUUUUNNNNSSSSEEEETTTT. The
  434.                     XXXXmmmmNNNNttttoooogggggggglllleeeeMMMMooooddddeeee resource is forced to
  435.                     XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____BBBBOOOOOOOOLLLLEEEEAAAANNNN if the toggle is in an
  436.                     XXXXmmmmRRRRoooowwwwCCCCoooolllluuuummmmnnnn widget whose radio behavior is
  437.                     XXXXmmmmOOOONNNNEEEE____OOOOFFFF____MMMMAAAANNNNYYYY. In XXXXmmmmTTTTOOOOGGGGGGGGLLLLEEEE____BBBBOOOOOOOOLLLLEEEEAAAANNNN mode, the
  438.                     XXXXmmmmNNNNsssseeeetttt resource can only accept XXXXmmmmSSSSEEEETTTT and XXXXmmmmUUUUNNNNSSSSEEEETTTT.
  439.  
  440.           XXXXmmmmNNNNuuuunnnnsssseeeelllleeeeccccttttCCCCoooolllloooorrrr
  441.                     Allows the application to specify what color fills
  442.                     the center of the square, diamond-shaped, or round
  443.                     indicator when it is not set.  If this color is
  444.                     the same as either the top or the bottom shadow
  445.                     color of the indicator, a one-pixel-wide margin is
  446.                     left between the shadows and the fill; otherwise,
  447.                     it is filled completely.  This resource's default
  448.                     for a color display is XXXXmmmmNNNNbbbbaaaacccckkkkggggrrrroooouuuunnnndddd.  For a
  449.                     monochrome display, the default is set to the
  450.                     background color. To set the background of the
  451.                     button to XXXXmmmmNNNNuuuunnnnsssseeeelllleeeeccccttttCCCCoooolllloooorrrr when XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is
  452.                     XXXXmmmmIIIINNNNDDDDIIIICCCCAAAATTTTOOOORRRR____NNNNOOOONNNNEEEE, the value of XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt
  453.                     must be explicitly set to True. This resource acts
  454.                     like the XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr resource, but for the case
  455.                     when XXXXmmmmNNNNsssseeeetttt is XXXXmmmmUUUUNNNNSSSSEEEETTTT.
  456.  
  457.  
  458.  
  459.      Page 7                                         (printed 10/24/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  467.  
  468.  
  469.  
  470.           XXXXmmmmNNNNvvvvaaaalllluuuueeeeCCCChhhhaaaannnnggggeeeeddddCCCCaaaallllllllbbbbaaaacccckkkk
  471.                     Specifies the list of callbacks called when the
  472.                     ToggleButton value is changed. To change the
  473.                     value, press and release the active mouse button
  474.                     while the pointer is inside the ToggleButton. This
  475.                     action also causes this widget to be disarmed.
  476.                     For this callback, the reason is
  477.                     XXXXmmmmCCCCRRRR____VVVVAAAALLLLUUUUEEEE____CCCCHHHHAAAANNNNGGGGEEEEDDDD.
  478.  
  479.           XXXXmmmmNNNNvvvviiiissssiiiibbbblllleeeeWWWWhhhheeeennnnOOOOffffffff
  480.                     Indicates that the toggle indicator is visible in
  481.                     the unselected state when the Boolean value is
  482.                     True.  When the ToggleButton is in a menu, the
  483.                     default value is False.  When the ToggleButton is
  484.                     in a RadioBox, the default value is True.
  485.  
  486.         IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss
  487.           ToggleButton inherits behavior and resources from the
  488.           superclasses described in the following tables.  For a
  489.           complete description of each resource, refer to the
  490.           reference page for that superclass.
  491.  
  492.                                                      XXXXmmmmLLLLaaaabbbbeeeellll RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  493.           NNNNaaaammmmeeee                        CCCCllllaaaassssssss                       TTTTyyyyppppeeee                DDDDeeeeffffaaaauuuulllltttt                  AAAAcccccccceeeessssssss
  494.           XmNaccelerator              XmCAccelerator              String              NULL                     CSG
  495.           XmNacceleratorText          XmCAcceleratorText          XmString            NULL                     CSG
  496.           XmNalignment                XmCAlignment                unsigned char       dynamic                  CSG
  497.           XmNfontList                 XmCFontList                 XmFontList          dynamic                  CSG
  498.           XmNlabelInsensitivePixmap   XmCLabelInsensitivePixmap   Pixmap              XmUNSPECIFIED_PIXMAP     CSG
  499.           XmNlabelPixmap              XmCLabelPixmap              Pixmap              XmUNSPECIFIED_PIXMAP     CSG
  500.           XmNlabelString              XmCXmString                 XmString            dynamic                  CSG
  501.           XmNlabelType                XmCLabelType                unsigned char       XmSTRING                 CSG
  502.           XmNmarginBottom             XmCMarginBottom             Dimension           dynamic                  CSG
  503.           XmNmarginHeight             XmCMarginHeight             Dimension           2                        CSG
  504.           XmNmarginLeft               XmCMarginLeft               Dimension           dynamic                  CSG
  505.           XmNmarginRight              XmCMarginRight              Dimension           0                        CSG
  506.           XmNmarginTop                XmCMarginTop                Dimension           dynamic                  CSG
  507.           XmNmarginWidth              XmCMarginWidth              Dimension           2                        CSG
  508.           XmNmnemonic                 XmCMnemonic                 KeySym              NULL                     CSG
  509.           XmNmnemonicCharSet          XmCMnemonicCharSet          String              XmFONTLIST_DEFAULT_TAG   CSG
  510.           XmNrecomputeSize            XmCRecomputeSize            Boolean             True                     CSG
  511.           XmNrenderTable              XmCRenderTable              XmRenderTable       dynamic                  CSG
  512.           XmNstringDirection          XmCStringDirection          XmStringDirection   dynamic                  CSG
  513.  
  514.                                                XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  515.           NNNNaaaammmmeeee                      CCCCllllaaaassssssss                   TTTTyyyyppppeeee               DDDDeeeeffffaaaauuuulllltttt                AAAAcccccccceeeessssssss
  516.           XmNbottomShadowColor      XmCBottomShadowColor    Pixel              dynamic                CSG
  517.           XmNbottomShadowPixmap     XmCBottomShadowPixmap   Pixmap             XmUNSPECIFIED_PIXMAP   CSG
  518.           XmNconvertCallback        XmCCallback             XtCallbackList     NULL                   C
  519.           XmNforeground             XmCForeground           Pixel              dynamic                CSG
  520.  
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                                         (printed 10/24/98)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  533.  
  534.  
  535.  
  536.           XmNhelpCallback           XmCCallback             XtCallbackList     NULL                   C
  537.           XmNhighlightColor         XmCHighlightColor       Pixel              dynamic                CSG
  538.           XmNhighlightOnEnter       XmCHighlightOnEnter     Boolean            False                  CSG
  539.           XmNhighlightPixmap        XmCHighlightPixmap      Pixmap             dynamic                CSG
  540.           XmNhighlightThickness     XmCHighlightThickness   Dimension          2                      CSG
  541.           XmNlayoutDirection        XmCLayoutDirection      XmDirection        dynamic                CG
  542.           XmNnavigationType         XmCNavigationType       XmNavigationType   XmNONE                 CSG
  543.           XmNpopupHandlerCallback   XmCCallback             XtCallbackList     NULL                   C
  544.           XmNshadowThickness        XmCShadowThickness      Dimension          dynamic                CSG
  545.           XmNtopShadowColor         XmCTopShadowColor       Pixel              dynamic                CSG
  546.           XmNtopShadowPixmap        XmCTopShadowPixmap      Pixmap             dynamic                CSG
  547.           XmNtraversalOn            XmCTraversalOn          Boolean            True                   CSG
  548.           XmNunitType               XmCUnitType             unsigned char      dynamic                CSG
  549.           XmNuserData               XmCUserData             XtPointer          NULL                   CSG
  550.  
  551.                                                         CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
  552.           NNNNaaaammmmeeee                            CCCCllllaaaassssssss                           TTTTyyyyppppeeee             DDDDeeeeffffaaaauuuulllltttt                AAAAcccccccceeeessssssss
  553.           XmNaccelerators                 XmCAccelerators                 XtAccelerators   dynamic                CSG
  554.           XmNancestorSensitive            XmCSensitive                    Boolean          dynamic                G
  555.           XmNbackground                   XmCBackground                   Pixel            dynamic                CSG
  556.           XmNbackgroundPixmap             XmCPixmap                       Pixmap           XmUNSPECIFIED_PIXMAP   CSG
  557.           XmNborderColor                  XmCBorderColor                  Pixel            XtDefaultForeground    CSG
  558.           XmNborderPixmap                 XmCPixmap                       Pixmap           XmUNSPECIFIED_PIXMAP   CSG
  559.           XmNborderWidth                  XmCBorderWidth                  Dimension        0                      CSG
  560.           XmNcolormap                     XmCColormap                     Colormap         dynamic                CG
  561.           XmNdepth                        XmCDepth                        int              dynamic                CG
  562.           XmNdestroyCallback              XmCCallback                     XtCallbackList   NULL                   C
  563.           XmNheight                       XmCHeight                       Dimension        dynamic                CSG
  564.           XmNinitialResourcesPersistent   XmCInitialResourcesPersistent   Boolean          True                   C
  565.           XmNmappedWhenManaged            XmCMappedWhenManaged            Boolean          True                   CSG
  566.           XmNscreen                       XmCScreen                       Screen *         dynamic                CG
  567.           XmNsensitive                    XmCSensitive                    Boolean          True                   CSG
  568.           XmNtranslations                 XmCTranslations                 XtTranslations   dynamic                CSG
  569.           XmNwidth                        XmCWidth                        Dimension        dynamic                CSG
  570.           XmNx                            XmCPosition                     Position         0                      CSG
  571.           XmNy                            XmCPosition                     Position         0                      CSG
  572.  
  573.         CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
  574.           A pointer to the following structure is passed to each
  575.           callback:
  576.  
  577.           typedef struct
  578.           {
  579.                   int _r_e_a_s_o_n;
  580.                   XEvent * _e_v_e_n_t;
  581.                   int _s_e_t;
  582.           } XmToggleButtonCallbackStruct;
  583.  
  584.           _r_e_a_s_o_n    Indicates why the callback was invoked
  585.  
  586.           _e_v_e_n_t     Points to the _X_E_v_e_n_t that triggered the callback
  587.  
  588.  
  589.  
  590.  
  591.      Page 9                                         (printed 10/24/98)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  599.  
  600.  
  601.  
  602.           _s_e_t       Reflects the ToggleButton's state, either XXXXmmmmSSSSEEEETTTT
  603.                     (selected), XXXXmmmmUUUUNNNNSSSSEEEETTTT (unselected), or
  604.                     XXXXmmmmIIIINNNNDDDDEEEETTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE (neither).  Note that the reported
  605.                     state is the state that the ToggleButton is in
  606.                     after the _e_v_e_n_t has been processed. For example,
  607.                     suppose that a user clicks on a ToggleButton to
  608.                     change it from the unselected state to the
  609.                     selected state. In this case, ToggleButton changes
  610.                     the value of _s_e_t from XXXXmmmmUUUUNNNNSSSSEEEETTTTto XXXXmmmmSSSSEEEETTTT prior to
  611.                     calling the callback.
  612.  
  613.         TTTTrrrraaaannnnssssllllaaaattttiiiioooonnnnssss
  614.           XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn includes translations from _P_r_i_m_i_t_i_v_e.
  615.           Additional XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn translations for buttons not in a
  616.           menu system are described in the following list.
  617.  
  618.           Note that altering translations in ####oooovvvveeeerrrrrrrriiiiddddeeeeor ####aaaauuuuggggmmmmeeeennnntttt mode
  619.           is undefined.
  620.  
  621.           The following key names are listed in the X standard key
  622.           event translation table syntax.  This format is the one used
  623.           by Motif to specify the widget actions corresponding to a
  624.           given key.  A brief overview of the format is provided under
  625.           VVVViiiirrrrttttuuuuaaaallllBBBBiiiinnnnddddiiiinnnnggggssss(3).  For a complete description of the
  626.           format, please refer to the X Toolkit Instrinsics
  627.           Documentation.
  628.  
  629.           cccc<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>:
  630.                     ButtonTakeFocus()
  631.  
  632.           ~~~~cccc<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>:
  633.                     Arm()
  634.  
  635.           ~~~~cccc<<<<BBBBttttnnnn1111UUUUpppp>>>>:
  636.                     Select() Disarm()
  637.  
  638.           <<<<BBBBttttnnnn2222DDDDoooowwwwnnnn>>>>:
  639.                     ProcessDrag()
  640.  
  641.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffAAAAccccttttiiiivvvvaaaatttteeee>>>>:
  642.                     PrimitiveParentActivate()
  643.  
  644.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffCCCCaaaannnncccceeeellll>>>>:
  645.                     PrimitiveParentCancel()
  646.  
  647.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffSSSSeeeelllleeeecccctttt>>>>:
  648.                     ArmAndActivate()
  649.  
  650.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffHHHHeeeellllpppp>>>>:
  651.                     Help()
  652.  
  653.           ~~~~ssss ~~~~mmmm ~~~~aaaa <<<<KKKKeeeeyyyy>>>>RRRReeeettttuuuurrrrnnnn:
  654.  
  655.  
  656.  
  657.      Page 10                                        (printed 10/24/98)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  665.  
  666.  
  667.  
  668.                     PrimitiveParentActivate()
  669.  
  670.           ~~~~ssss ~~~~mmmm ~~~~aaaa <<<<KKKKeeeeyyyy>>>>ssssppppaaaacccceeee:
  671.                     ArmAndActivate()
  672.  
  673.           XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn inherits menu traversal translations from
  674.           XXXXmmmmLLLLaaaabbbbeeeellll.  Additional XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn translations for
  675.           TTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnnssss in a menu system are described in the
  676.           following list.  In a Popup menu system, <<<<BBBBttttnnnn3333>>>> also
  677.           performs the <<<<BBBBttttnnnn1111>>>>actions.
  678.  
  679.           <<<<BBBBttttnnnn2222DDDDoooowwwwnnnn>>>>:
  680.                     ProcessDrag()
  681.  
  682.           cccc<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>>:
  683.                     MenuButtonTakeFocus()
  684.  
  685.           cccc<<<<BBBBttttnnnn1111UUUUpppp>>>>:
  686.                     MenuButtonTakeFocusUp()
  687.  
  688.           ~~~~cccc<<<<BBBBttttnnnnDDDDoooowwwwnnnn>>>>:
  689.                     BtnDown()
  690.  
  691.           ~~~~cccc<<<<BBBBttttnnnnUUUUpppp>>>>:
  692.                     BtnUp()
  693.  
  694.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffSSSSeeeelllleeeecccctttt>>>>:
  695.                     ArmAndActivate()
  696.  
  697.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffAAAAccccttttiiiivvvvaaaatttteeee>>>>:
  698.                     ArmAndActivate()
  699.  
  700.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffHHHHeeeellllpppp>>>>:
  701.                     Help()
  702.  
  703.           ::::<<<<KKKKeeeeyyyy>>>><<<<oooossssffffCCCCaaaannnncccceeeellll>>>>:
  704.                     MenuEscape()
  705.  
  706.           ~~~~ssss ~~~~mmmm ~~~~aaaa <<<<KKKKeeeeyyyy>>>>RRRReeeettttuuuurrrrnnnn:
  707.                     ArmAndActivate()
  708.  
  709.           ~~~~ssss ~~~~mmmm ~~~~aaaa <<<<KKKKeeeeyyyy>>>>ssssppppaaaacccceeee:
  710.                     ArmAndActivate()
  711.  
  712.         AAAAccccttttiiiioooonnnn RRRRoooouuuuttttiiiinnnneeeessss
  713.           The XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn action routines are
  714.  
  715.           Arm():    If the button was previously unset, this action
  716.                     does the following:  if XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is True, it
  717.                     draws the indicator shadow so that the indicator
  718.                     looks pressed; if XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt is True, it
  719.                     fills the indicator with the color specified by
  720.  
  721.  
  722.  
  723.      Page 11                                        (printed 10/24/98)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  731.  
  732.  
  733.  
  734.                     XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr.  If XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is False, it
  735.                     draws the button shadow so that the button looks
  736.                     pressed.  If XXXXmmmmNNNNllllaaaabbbbeeeellllTTTTyyyyppppeeee is XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP, the
  737.                     XXXXmmmmNNNNsssseeeelllleeeeccccttttPPPPiiiixxxxmmmmaaaapppp is used as the button face.  This
  738.                     action calls the XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  739.  
  740.                     If the button was previously set, this action does
  741.                     the following:  if both XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn and
  742.                     XXXXmmmmNNNNvvvviiiissssiiiibbbblllleeeeWWWWhhhheeeennnnOOOOffffffff are True, it draws the indicator
  743.                     shadow so that the indicator looks raised; if
  744.                     XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt is True, it fills the indicator
  745.                     with the background color.  If XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is
  746.                     False, it draws the button shadow so that the
  747.                     button looks raised.  If XXXXmmmmNNNNllllaaaabbbbeeeellllTTTTyyyyppppeeee is XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP,
  748.                     the XXXXmmmmNNNNllllaaaabbbbeeeellllPPPPiiiixxxxmmmmaaaapppp is used as the button face.
  749.                     This action calls the XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  750.  
  751.           ArmAndActivate():
  752.                     If the ToggleButton was previously set, unsets it;
  753.                     if the ToggleButton was previously unset, sets it.
  754.  
  755.                     In a menu, this action unposts all menus in the
  756.                     menu hierarchy.  Unless the button is already
  757.                     armed, it calls the XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  758.                     This action calls the XXXXmmmmNNNNvvvvaaaalllluuuueeeeCCCChhhhaaaannnnggggeeeeddddCCCCaaaallllllllbbbbaaaacccckkkk and
  759.                     XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  760.  
  761.                     Outside a menu, if the button was previously
  762.                     unset, this action does the following:  if
  763.                     XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is True, it draws the indicator
  764.                     shadow so that the indicator looks pressed; if
  765.                     XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt is True, it fills the indicator
  766.                     with the color specified by XXXXmmmmNNNNsssseeeelllleeeeccccttttCCCCoooolllloooorrrr.  If
  767.                     XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is False, it draws the button
  768.                     shadow so that the button looks pressed.  If
  769.                     XXXXmmmmNNNNllllaaaabbbbeeeellllTTTTyyyyppppeeee is XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP, the XXXXmmmmNNNNsssseeeelllleeeeccccttttPPPPiiiixxxxmmmmaaaapppp is
  770.                     used as the button face.  This action calls the
  771.                     XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk, XXXXmmmmNNNNvvvvaaaalllluuuueeeeCCCChhhhaaaannnnggggeeeeddddCCCCaaaallllllllbbbbaaaacccckkkk, and
  772.                     XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  773.  
  774.                     Outside a menu, if the button was previously set,
  775.                     this action does the following:  if both
  776.                     XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn and XXXXmmmmNNNNvvvviiiissssiiiibbbblllleeeeWWWWhhhheeeennnnOOOOffffffff are True, it
  777.                     draws the indicator shadow so that the indicator
  778.                     looks raised; if XXXXmmmmNNNNffffiiiillllllllOOOOnnnnSSSSeeeelllleeeecccctttt is True, it fills
  779.                     the indicator with the background color.  If
  780.                     XXXXmmmmNNNNiiiinnnnddddiiiiccccaaaattttoooorrrrOOOOnnnn is False, it draws the button
  781.                     shadow so that the button looks raised.  If
  782.                     XXXXmmmmNNNNllllaaaabbbbeeeellllTTTTyyyyppppeeee is XXXXmmmmPPPPIIIIXXXXMMMMAAAAPPPP, the XXXXmmmmNNNNllllaaaabbbbeeeellllPPPPiiiixxxxmmmmaaaapppp is
  783.                     used as the button face.  This action calls the
  784.                     XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk, XXXXmmmmNNNNvvvvaaaalllluuuueeeeCCCChhhhaaaannnnggggeeeeddddCCCCaaaallllllllbbbbaaaacccckkkk, and
  785.                     XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  786.  
  787.  
  788.  
  789.      Page 12                                        (printed 10/24/98)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  797.  
  798.  
  799.  
  800.           BtnDown():
  801.                     This action unposts any menus posted by the
  802.                     ToggleButton's parent menu, disables keyboard
  803.                     traversal for the menu, and enables mouse
  804.                     traversal for the menu.  It draws the shadow in
  805.                     the armed state and, unless the button is already
  806.                     armed, calls the XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkkcallbacks.
  807.  
  808.           BtnUp():  This action unposts all menus in the menu
  809.                     hierarchy.  If the ToggleButton was previously
  810.                     set, unsets it; if the ToggleButton was previously
  811.                     unset, sets it.  It calls the
  812.                     XXXXmmmmNNNNvvvvaaaalllluuuueeeeCCCChhhhaaaannnnggggeeeeddddCCCCaaaallllllllbbbbaaaacccckkkk callbacks and then the
  813.                     XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  814.  
  815.           ButtonTakeFocus():
  816.                     Causes the ToggleButton to take keyboard focus
  817.                     when CCCCttttrrrrllll<<<<BBBBttttnnnn1111DDDDoooowwwwnnnn>>>> is pressed, without activating
  818.                     the widget.
  819.  
  820.           Disarm(): Calls the callbacks for XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk.
  821.  
  822.           Help():   In a Pulldown or Popup MenuPane, unposts all menus
  823.                     in the menu hierarchy and restores keyboard focus
  824.                     to the widget that had the focus before the menu
  825.                     system was entered.  Calls the callbacks for
  826.                     XXXXmmmmNNNNhhhheeeellllppppCCCCaaaallllllllbbbbaaaacccckkkk if any exist.  If there are no
  827.                     help callbacks for this widget, this action calls
  828.                     the help callbacks for the nearest ancestor that
  829.                     has them.
  830.  
  831.           MenuShellPopdownOne():
  832.                     In a toplevel Pulldown MenuPane from a MenuBar,
  833.                     unposts the menu, disarms the MenuBar
  834.                     CascadeButton and the MenuBar, and restores
  835.                     keyboard focus to the widget that had the focus
  836.                     before the MenuBar was entered.  In other Pulldown
  837.                     MenuPanes, unposts the menu.
  838.  
  839.                     In a Popup MenuPane, unposts the menu and restores
  840.                     keyboard focus to the widget from which the menu
  841.                     was posted.
  842.  
  843.           ProcessDrag():
  844.                     Drags the contents of a ToggleButton label,
  845.                     identified when BBBBTTTTrrrraaaannnnssssffffeeeerrrr is pressed.  This action
  846.                     sets the XXXXmmmmNNNNccccoooonnnnvvvveeeerrrrttttPPPPrrrroooocccc of the DragContext to a
  847.                     function that calls the XXXXmmmmNNNNccccoooonnnnvvvveeeerrrrttttCCCCaaaallllllllbbbbaaaacccckkkk
  848.                     procedures, possibly multiple times, for the
  849.                     ____MMMMOOOOTTTTIIIIFFFF____DDDDRRRROOOOPPPP selection.  This action is undefined
  850.                     for ToggleButtons used in a menu system.
  851.  
  852.  
  853.  
  854.  
  855.      Page 13                                        (printed 10/24/98)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV        XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
  863.  
  864.  
  865.  
  866.           Select(): If the pointer is within the button, takes the
  867.                     following actions:  If the button was previously
  868.                     unset, sets it; if the button was previously set,
  869.                     unsets it.  This action calls the
  870.                     XXXXmmmmNNNNvvvvaaaalllluuuueeeeCCCChhhhaaaannnnggggeeeeddddCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  871.  
  872.         AAAAddddddddiiiittttiiiioooonnnnaaaallll BBBBeeeehhhhaaaavvvviiiioooorrrr
  873.           This widget has the following additional behavior:
  874.  
  875.           <<<<EEEEnnnntttteeeerrrrWWWWiiiinnnnddddoooowwww>>>>:
  876.                     In a menu, if keyboard traversal is enabled, this
  877.                     action does nothing.  Otherwise, it draws the
  878.                     shadow in the armed state and calls the
  879.                     XXXXmmmmNNNNaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  880.  
  881.                     If the ToggleButton is not in a menu and the
  882.                     cursor leaves and then reenters the ToggleButton's
  883.                     window while the button is pressed, this action
  884.                     restores the button's armed appearance.
  885.  
  886.           <<<<LLLLeeeeaaaavvvveeeeWWWWiiiinnnnddddoooowwww>>>>:
  887.                     In a menu, if keyboard traversal is enabled, this
  888.                     action does nothing.  Otherwise, it draws the
  889.                     shadow in the unarmed state and calls the
  890.                     XXXXmmmmNNNNddddiiiissssaaaarrrrmmmmCCCCaaaallllllllbbbbaaaacccckkkk callbacks.
  891.  
  892.                     If the ToggleButton is not in a menu and the
  893.                     cursor leaves the ToggleButton's window while the
  894.                     button is pressed, this action restores the
  895.                     button's unarmed appearance.
  896.  
  897.         VVVViiiirrrrttttuuuuaaaallll BBBBiiiinnnnddddiiiinnnnggggssss
  898.           The bindings for virtual keys are vendor specific.  For
  899.           information about bindings for virtual buttons and keys, see
  900.           VVVViiiirrrrttttuuuuaaaallllBBBBiiiinnnnddddiiiinnnnggggssss(3).
  901.  
  902.      RRRREEEELLLLAAAATTTTEEEEDDDD
  903.           CCCCoooorrrreeee(3), XXXXmmmmCCCCrrrreeeeaaaatttteeeeRRRRaaaaddddiiiiooooBBBBooooxxxx(3), XXXXmmmmCCCCrrrreeeeaaaatttteeeeTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn(3),
  904.           XXXXmmmmLLLLaaaabbbbeeeellll(3), XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee(3), XXXXmmmmRRRRoooowwwwCCCCoooolllluuuummmmnnnn(3),
  905.           XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnnGGGGeeeettttSSSSttttaaaatttteeee(3), and XXXXmmmmTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnnSSSSeeeettttSSSSttttaaaatttteeee(3).
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.      Page 14                                        (printed 10/24/98)
  922.  
  923.  
  924.  
  925.